package collection;

import java.util.Collection;

public class CollectionDemo2 {
    public static void main(String[] args) {
        Collection c = new java.util.ArrayList();
        //Collection c = new java.util.HashSet();
        c.add(new Point(1,2));
        c.add(new Point(3,4));
        c.add(new Point(5,6));
        c.add(new Point(7,8));
        c.add(new Point(9,0));
        boolean b = c.add(new Point(5,6));
        System.out.println(b);
        System.out.println(c);
        System.out.println(c.size());
        System.out.println(c.isEmpty());

        boolean b1 = c.contains(new Point(1,2));
        System.out.println(b1);
        Point p = new Point(3,4);
        boolean b2 =c.contains(p);
        System.out.println(b2);

        boolean b3 = c.remove(p);
        System.out.println(c);
        Point p1 = new Point(5,6);
        boolean b4 = c.remove(p1);
        System.out.println(c);


    }
}
